package Eyjafjalla.card.skill;

import Eyjafjalla.action.VolcanoEchoAction;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.card.attack.VolcanoStone_Eyjafjalla;
import Eyjafjalla.power.VolcanoEchoPower;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class VolcanoEcho_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "VolcanoEcho_Eyjafjalla";
    private static final CardStrings cardStrings;

    public VolcanoEcho_Eyjafjalla(){
        super(ID, cardStrings.NAME,1,cardStrings.DESCRIPTION,CardType.SKILL,CardRarity.RARE,CardTarget.NONE);
        this.exhaust = true;
        this.selfRetain = true;
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
        this.cardsToPreview = new VolcanoStone_Eyjafjalla();
    }

    @Override
    public AbstractCard makeCopy() {
        return new VolcanoEcho_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        if(isFire()){
            addToBot(new VolcanoEchoAction(upgraded,p.currentBlock,2));
        }
    }

    @Override
    public void atTurnStartPreDraw() {
        this.flash();
        addToBot(new VolcanoEchoAction(upgraded,AbstractDungeon.player.currentBlock,1));
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            rawDescription = cardStrings.UPGRADE_DESCRIPTION;
            initializeDescription();
            cardsToPreview.upgrade();
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}


